package com.singfan.core.service;

import com.singfan.core.dao.database.model.*;

import java.util.List;

/**
 *
 * Author: james
 * Date: 2015-07-29 11:45
 * Desc:
 */
public interface ICustomerService {
    void createPhoneSecurityCode(String phoneNumber, String securityCode);

    boolean verifyPhoneSecurityCode(String phoneNumber, String securityCode);

    Customer createOrUpdateCustomer(String phoneNumber, String phoneType, int cityId);

    String createAccessToken(long customerId, int cityId);

    Customer findCustomerByToken(String accessToken);

    CustomerToken findCustomerToken(String accessToken);

    boolean isCollected(long customerId, long collectId, int collectType);

    void collect(long customerId, long collectId, int collectType);

    void collectCancel(long customerId, long collectId, int collectType);

    List<CustomerCollect> findCollectList(long customerId, int collectType, int pageIndex, int pageSize);

    void updateCustomer(Customer customer);

    List<CustomerCoupon> findCustomerCouponList(long customerId, boolean isExpired, int pageIndex, int pageSize);

    CustomerCoupon findCustomerCoupon(long customerCouponId);

    void createCustomerCoupon(CustomerCoupon customerCoupon);

    List<Long> findAllCustomerIdList();

    boolean isDisabledAccount(String phoneNumber);

    Customer findCustomerByPhoneNumber(String phoneNumber);

    void updateCustomerStatus(long customerId, int status);

    void deleteCustomerToken(long customerId);

    void createCoupon(CouponRecord couponRecord);

    List<CouponRecord> findAllCouponRecordList();

    void deleteCoupon(long couponId);
}
